package com.tfjybj.itoo.teach.provider.facade;

import org.apache.dubbo.config.annotation.Service;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.teach.FacadeApi.StudentTeachClassApi;
import com.tfjybj.itoo.teach.entity.StudentTeachClassEntity;
import com.tfjybj.itoo.teach.provider.service.StudentTeachClassService;

import javax.annotation.Resource;
import java.util.List;

@Service
@org.springframework.stereotype.Service
public class StudentTeachClassFacade implements StudentTeachClassApi {

    @Resource
    private StudentTeachClassService studentTeachClassService;


    /**
     * 添加
     *
     * @param studentTeachClassEntity StudentTeachClassEntity
     * @return 添加的结果
     * @author 郭满亮
     * @since 2.0.0 2019-01-29 15:52:00
     */
    @Override
    public boolean save(StudentTeachClassEntity studentTeachClassEntity) {
        return studentTeachClassService.save(studentTeachClassEntity);
    }

    /**
     * 删除
     *
     * @param id 主键id
     * @return ItooResult 是否删除成功
     * @author 郭满亮
     * @since 2.0.0 2019-01-29 15:52:00
     */
    @Override
    public boolean removeById(String id) {
        return studentTeachClassService.removeById(id);
    }

    /**
     * 批量删除
     *
     * @param ids ids
     * @return ItooResult 批量删除是否成功结果
     * @author 郭满亮
     * @since 2.0.0 2019-01-29 15:52:00
     */
    @Override
    public boolean removeByIds(List<String> ids) {
        return studentTeachClassService.removeByIds(ids);
    }

    /**
     * 修改
     *
     * @param studentTeachClassEntity StudentTeachClassEntity
     * @return 修改后的结果
     * @author 郭满亮
     * @since 2.0.0 2019-01-29 15:52:00
     */
    @Override
    public boolean updateById(StudentTeachClassEntity studentTeachClassEntity) {
        return studentTeachClassService.updateById(studentTeachClassEntity);
    }

    /**
     * 根据id查找StudentTeachClass
     *
     * @param id 主键id
     * @return 根据id查找的结果
     * @author 郭满亮
     * @since 2.0.0 2019-01-29 15:52:00
     */
    @Override
    public StudentTeachClassEntity getById(String id) {
        return studentTeachClassService.getById(id);
    }

    /**
     * 分页查询所有StudentTeachClass
     *
     * @param pageNo   页码
     * @param pageSize 每页条数
     * @return 分页查询的结果
     * @author 郭满亮
     * @since 2.0.0 2019-01-29 15:52:00
     */
    @Override
    public PageInfo<StudentTeachClassEntity> queryPageAll(Integer pageNo, Integer pageSize) {
        return studentTeachClassService.queryPageAll(pageNo, pageSize);
    }
}
